package com.gaohe.official.service.impl;

import java.util.List;
import com.gaohe.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.official.mapper.FmBulletinMapper;
import com.gaohe.official.domain.FmBulletin;
import com.gaohe.official.service.IFmBulletinService;

/**
 * 系统公告Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-03
 */
@Service
public class FmBulletinServiceImpl implements IFmBulletinService 
{
    @Autowired
    private FmBulletinMapper fmBulletinMapper;

    /**
     * 查询系统公告
     * 
     * @param bulletinId 系统公告主键
     * @return 系统公告
     */
    @Override
    public FmBulletin selectFmBulletinByBulletinId(Long bulletinId)
    {
        return fmBulletinMapper.selectFmBulletinByBulletinId(bulletinId);
    }

    /**
     * 查询系统公告列表
     * 
     * @param fmBulletin 系统公告
     * @return 系统公告
     */
    @Override
    public List<FmBulletin> selectFmBulletinList(FmBulletin fmBulletin)
    {
        return fmBulletinMapper.selectFmBulletinList(fmBulletin);
    }

    /**
     * 新增系统公告
     * 
     * @param fmBulletin 系统公告
     * @return 结果
     */
    @Override
    public int insertFmBulletin(FmBulletin fmBulletin)
    {
        fmBulletin.setCreateTime(DateUtils.getNowDate());
        return fmBulletinMapper.insertFmBulletin(fmBulletin);
    }

    /**
     * 修改系统公告
     * 
     * @param fmBulletin 系统公告
     * @return 结果
     */
    @Override
    public int updateFmBulletin(FmBulletin fmBulletin)
    {
        fmBulletin.setUpdateTime(DateUtils.getNowDate());
        return fmBulletinMapper.updateFmBulletin(fmBulletin);
    }

    /**
     * 批量删除系统公告
     * 
     * @param bulletinIds 需要删除的系统公告主键
     * @return 结果
     */
    @Override
    public int deleteFmBulletinByBulletinIds(Long[] bulletinIds)
    {
        return fmBulletinMapper.deleteFmBulletinByBulletinIds(bulletinIds);
    }

    /**
     * 删除系统公告信息
     * 
     * @param bulletinId 系统公告主键
     * @return 结果
     */
    @Override
    public int deleteFmBulletinByBulletinId(Long bulletinId)
    {
        return fmBulletinMapper.deleteFmBulletinByBulletinId(bulletinId);
    }
}
